<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="layout :: common_header(~{::title})">
    <title>[[${sjcd}]] - 仓库管理系统</title>
</head>
<body th:replace="layout :: common_body(~{::div.layui-body})">

<div class="layui-body" style="padding:15px;top: 0px;">

    <!-- start sp-wrapper -->
    <link rel="stylesheet" href="/sb/stock.css"/>
    <div class="sp-wrapper">
        <h2 class="sp-title"><span th:text="${sjcd}"></span></h2>
        <div class="sp-tool">
            <span class="fl">
                <form action="/goods_loss_stock/list" method="get">
                <b><input type="text" name="billNo" th:value="${billNo}" style="width: 180px;" placeholder="输入单据编号查询"></b>
                <b>单据日期：
                    <input type="text" name="startDate" autocomplete="off" th:value="${startDate}" style="width: 90px;" class="startDate"> -
                    <input type="text" th:value="${endDate}" name="endDate" class="endDate" autocomplete="off" style="width: 90px;">
                </b>
                    <input type="submit" class="button" value="查询">
                    <b>总共：&nbsp;[[${totalSize}]]&nbsp;条记录</b>
                </form>
            </span>

            <span class="fr"><a href="/goods_loss_stock/loss_add" class="add">新增</a>
                <!--                <i>导出</i>-->
            </span>
        </div>
        <div class="sp-table">

            <table>
                <thead>
                <tr>
                    <th>ID</th>
                    <th>单据日期</th>
                    <th>单据编号</th>
                    <th>数量</th>
                    <th>制单人</th>
                    <th>审核人</th>
<!--                    <th>来源</th>-->
                    <th>状态</th>
                    <th>报损理由</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody id="sp-data">
                <tr th:each="item:${lists}">
                    <td th:text="${item.id}">2019-03-15</td>
                    <td th:text="${#dates.format(item.createTime*1000,'yyyy-MM-dd')}">2019-03-15</td>
                    <td th:text="${item.number}">CG201903121700193</td>
                    <td th:text="${item.totalQuantity}">500</td>
                    <td th:text="${item.createUserName}">华衣</td>
                    <td th:text="${item.auditUserName}">华衣</td>
<!--                    <td th:text="${item.sourceType==1?'正常商品库':'不良商品库'}">华衣</td>-->
                    <td th:text="${item.status==0?'未审核':'已审核'}">华衣</td>
                    <td th:text="${item.lossReason}">收到货请检查</td>
                    <td  th:text="${#dates.format(item.createTime * 1000 ,'yyyy-MM-dd HH:mm:ss')}"></td>
                    <td>
                        <a th:if="${item.status==0}"  th:href="@{/goods_loss_stock/loss_check(id=${item.id})}">审核</a>
                        <a target="_blank" th:href="@{/goods_loss_stock/loss_detail(id=${item.id})}">打印</a>
                    </td>
                </tr>

                </tbody>
            </table>

        </div>
        <div class="pages">
            <paging:pager th:value="${pageIndex}" th:rows="${totalSize}" th:size="${pageSize}"/>
        </div>
    </div>

    <script type="text/javascript" src="/sb/jquery.min.js"></script>
    <script type="text/javascript" src="/sb/Tips.min.js"></script>
    <script>
        layui.use(['laydate', 'layer'], function () {
            var laydate = layui.laydate;
            var layer = layui.layer;
            //执行一个laydate实例
            laydate.render({
                elem: '.startDate' //指定元素
            });
            laydate.render({
                elem: '.endDate' //指定元素
            });

        });
    </script>
</div>
</body>
<html>
